package com.devicemantra.coordinate.tasks;

import java.util.ArrayList;

import com.google.appengine.api.labs.taskqueue.Queue;

public class CTask {
	
	/* Queue name this task belongs to */
	private Queue mQueue; 
	private String mTaskUrl;
	private ArrayList mKeyValues = null;
	
	{
		mKeyValues = new ArrayList();
	}
	
	public CTask()
	{
		
	}
	
	public CTask(Queue pQueueName, String pTaskUrl)
	{
		mQueue = pQueueName;
		mTaskUrl = pTaskUrl;
	}
	
	public void addParameter(String pKey, String pValue)
	{
		CNameVal lNameVal = new CNameVal();
		lNameVal.setName(pKey);
		lNameVal.setValue(pValue);
		mKeyValues.add(lNameVal);
	}
	
	public void setTaskUrl(String pUrl)	{
		mTaskUrl = pUrl;
	}
	
	public ArrayList getParameters() {
		return mKeyValues;
	}

	public void setParameters(ArrayList mKeyValues) {
		this.mKeyValues = mKeyValues;
	}

	public void setQueue(Queue pQueue)	{
		mQueue = pQueue;
	}

	public Queue getQueue() {
		return mQueue;
	}

	public String getTaskUrl() {
		return mTaskUrl;
	}

}
